<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript">
        window.onload=function()
        {
            //声明一个对象
            const banji=
            {
                name:"garde3class2",
                stus:
                [
                    "xiaoming",
                    "xiaohong",
                    "xiaotian"
                ],
            }
            console.log(banji);
            //遍历这个对象
            /*
            for(let v of banji)
            {
                console.log(v);
            }
            */
            //
            let iterator=banji.stus[Symbol.iterator]();
            for(let i=0;i<banji.stus.length;i++)
            {
                console.log(iterator.next().value);
            }
        };
    </script>
</head>
<body>
    
</body>
</html>